package JavaSE.ThreadLearning.RunnableLearning.Demo03;

public class StaticMethod {
    public static synchronized void printfor() {
        for(int i=0; i<20; i++) {
            System.out.println(Thread.currentThread().getName() + i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
